/*
 * @Author: daidai
 * @Date: 2021-12-23 11:18:37
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-04-28 15:10:45
 * @FilePath: \web-pc\src\api\modules\index.js
 */
import * as API from "../api";

export const paramType ={
    'big1':"/bigscreen/countUserNum", //用户总览
    'big2':"/bigscreen/countDeviceNum", //设备总览
    'big3':"/bigscreen/sbtx", //设备提醒
    'big4':"/bigscreen/alarmNum", //报警次数
    'big5':'/bigscreen/ssyj',//实时预警
    'big6':'/bigscreen/installationPlan',// 安装计划
    'big7':'/bigscreen/ranking',// 报警排名
    'big8':'/bigscreen/centermap',// //中间地图
    'provinceStat':'/jxplat/webapi/screen/province/stat',// 全省数据接口(暂缺排行榜)
    'map':'/jxplat/webapi/screen/map',// 全省地图接口
    'museumStat':'/jxplat/webapi/screen/museum/stat',// 博物馆数据接口

    // 市级数据接口
    'provinceStatUrbanArea':'/jxplat/webapi/screen/city/stat',

    // 客流量接口
    // 省级
    'getProvDay':'/jxplat/webapi/screen/prov/flow/day',
    'getProvMonth':'/jxplat/webapi/screen/prov/flow/month',
    'getProvYear':'/jxplat/webapi/screen/prov/flow/year',
    'getProvCalendarYear':'/jxplat/webapi/flowcamera/prov/calendar',
    // 市级
    'getCityDay':'/jxplat/webapi/screen/city/flow/day',
    'getCityMonth':'/jxplat/webapi/screen/city/flow/month',
    'getCityYear':'/jxplat/webapi/screen/city/flow/year',
    'getCityCalendarYear':'/jxplat/webapi/flowcamera/city/calendar',
    'getMuseumList':'/jxplat/webapi/flowcamera/city/museumList',
    // 博物馆
    'getMuseumDay':'/jxplat/webapi/screen/museum/flow/day',
    'getMuseumMonth':'/jxplat/webapi/screen/museum/flow/month',
    'getMuseumYear':'/jxplat/webapi/screen/museum/flow/year',
    'getMuseumCalendarYear':'/jxplat/webapi/flowcamera/museum/calendar',

    'todayFlowData':'/kg-bussiness-province/test/totalPassgener/todayFlowData?currentDate=2024-04-17&userId=3424',// 客流量
    'getCamerListByReginId':'/kg-bussiness-province/test/totalPassgener/getCamerListByReginId',// 根据部门id获取客流量摄像机列表
    'getCameraUrl':'/kg-bussiness-wenbo/test/webEquip/getCameraUrl',// 获取实时视频接口（总）

    'getVideoUrl':'/jxplat/webapi/flowcamera/video',// 使用博物馆的id查询视频地址
    'getProvData':'/jxplat/webapi/flowcamera/prov/day',// 根据日期查询日客流数据-省级
    'getCityData':'/jxplat/webapi/flowcamera/city/day',// 根据日期查询日客流数据-市级
    'getMuseumData':'/jxplat/webapi/flowcamera/museum/day',// 根据日期查询日客流数据-博物馆
    }
/******************      通用增删改查       ********************* */
/**
 * 通用列表
 * @param {*} param
 */
 export const currentList =  (key,param)=> {
    return API.GET(paramType[key]+"/list", param)
}
export const currentPage =  (key,param)=> {
    return API.GET(paramType[key]+"/page", param)
}
/**
 * 查询可选择的列表
 * @param {*} param
 */
 export const currentSelectList=  (key,param)=> {
    return API.GET(paramType[key]+"/selectList", param)
}


/**
 * 通用新增
 * @param {*} param
 */
 export const currentSave= (key,param)=> {
    return API.POST(paramType[key]+"/save", param)
}
/**
 * 通用修改
 * @param {*} param
 */
 export const currentUpdate=  (key,param) => {
    return API.POST(paramType[key]+"/update", param)
}

/**
 * 通用删除
 * @param {*} param
 */
 export const currentDelete= (key,param) => {
    return API.POST(paramType[key]+"/delete", param)
}

/**
 * 通用获取所有不分页
 * @param {*} param
 */
 export const currentSelect=  (key,param)=> {
    return API.GET(paramType[key]+"/select", param)
}

/**
 * 通用GET
 * @param {*} param
 */
 export const currentGET=  (key,param)=> {
    return API.GET(paramType[key], param)
}
/**
 * 通用POST
 * @param {*} param
 */
 export const currentPOST=  (key,param)=> {
    return API.POST(paramType[key], param)
}
// 通用接口集合
export const currentApi={
    currentList,
    currentPage,
    currentSave,
    currentUpdate,
    currentDelete,
    currentSelect,
    currentSelectList,
    currentPOST,
    currentGET
}
